﻿<%@ Page Language="VB" MasterPageFile="~/MainLayout.master" AutoEventWireup="false" CodeFile="rptListing.aspx.vb" Inherits="rptListing" title="Untitled Page" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <div >
    <h1>Listing Report</h1>
<hr />

<asp:Label ID="lblStaffUID" runat="server" Visible="false" />

<div  runat="server" id="divError" class="msg-box-error" visible="false" enableviewstate="false">
    
        <span class="title">Error</span><br />
        <asp:Label ID="lblMsgError" runat="server" Text="ERROR" />
        </div>
<div  runat="server" id="divSuccessful" class="msg-box-success" visible="false" enableviewstate="false">
    
        <span class="title">Successful</span><br />
        <asp:Label ID="lblMsgSuccessful" runat="server" Text="Success" />
    
</div>

<p><%--Description of the page--%></p>
<table class="SearchFilter" width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
  <tr>
    <td width="30">&nbsp;</td>
    <td width="120">From Date</td>
    <td width="250">
        <asp:TextBox ID="txtFromDate" runat="server" onKeyPress="javascript: return false;" onPaste="javascript: return false;" />
        <asp:ImageButton runat="Server" ID="imgFromDateCal" AlternateText="Click to show calendar" ImageUrl="~/images/style01/Btn-calendar.png" />
        <cc1:CalendarExtender ID="ceFromDate" runat="server" Format="dd-MMM-yyyy" TargetControlID="txtFromDate" PopupButtonID="imgFromDateCal" />
        <asp:RequiredFieldValidator ID="rfvFromDate" ControlToValidate="txtFromDate" ErrorMessage="<br />*Please select a Date" ForeColor="Red" Font-Size="X-Small" runat="server" SetFocusOnError="true" ValidationGroup="generate" />
    </td>
    <td width="30">&nbsp;</td>
    <td width="120">To Date</td>
    <td width="250">
        <asp:TextBox ID="txtToDate" runat="server" onKeyPress="javascript: return false;" onPaste="javascript: return false;" />
        <asp:ImageButton runat="Server" ID="imgToDateCal" AlternateText="Click to show calendar" ImageUrl="~/images/style01/Btn-calendar.png" />
        <cc1:CalendarExtender ID="ceToDate" runat="server" Format="dd-MMM-yyyy" TargetControlID="txtToDate" PopupButtonID="imgToDateCal" />
        <asp:RequiredFieldValidator ID="rfvToDate" ControlToValidate="txtToDate" ErrorMessage="<br />*Please select a Date" ForeColor="Red" Font-Size="X-Small" runat="server" SetFocusOnError="true" ValidationGroup="generate" />
    </td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>Status</td>
    <td>
            <asp:DropDownList ID="ddlStatus" runat="server" style="width:250px;">
            <asp:ListItem Value="">-Select-</asp:ListItem>
            <asp:ListItem Value="0">Sale</asp:ListItem>
            <asp:ListItem Value="1">Rent</asp:ListItem>
            <asp:ListItem Value="2">All</asp:ListItem>
        </asp:DropDownList>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="ddlStatus" ErrorMessage="<br />*Please select a status" ForeColor="Red" Font-Size="X-Small" runat="server" SetFocusOnError="true" ValidationGroup="generate" />
    </td>
    <td>&nbsp;</td>
    <td>Staff Name</td>
    <td><asp:DropDownList ID="ddlStaffName" runat="server" /></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
<!--  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>-->
  <tr>
    <td>&nbsp;</td>
    <td colspan="5" align="right"><div style="border-top: 1px solid #c2c2c2; height:20px; padding-top:10px; "><asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="search-btn" Width="80" ForeColor="GrayText" ValidationGroup="generate" />    
     
        <asp:Button ID="btnResetSearch" runat="server" Text="Reset" CssClass="search-btn"/></div> 
    </td>
    <td>       </td>
    <td>&nbsp;</td>
  </tr>
  </tbody>

</table>

<br />
<table class="searchbox" cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td valign="bottom"><div class="header"><asp:ImageButton ID="imgGenerate" 
                runat="server" ImageUrl="~/images/style01/Btn-Gen-report.png" Width="100px" 
                Height="20px" AlternateText="Generate Report" ValidationGroup="generate" /><img src="images/style01/search-box-divider.gif" width="2" height="20" class="search-divider" /></div></td>
    </tr>
</table>
<!--Result Pane Here-->  
<table class="ResultPanelContainer" border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td>
        
            <table class="ResultPanelHeader" border="0" width="100%">
                <tr>
                    <td><asp:label ID="lblHeadNoOfItem" runat="server" text="0" />&nbsp;items total</td>
                    <td align="right">
                        Number of entries per page : <asp:LinkButton ID="lnkHead10Item" runat="server" Text="10" />&nbsp;<asp:LinkButton ID="lnkHead25Item" runat="server" Text="25" />&nbsp;<asp:LinkButton ID="lnkHead100Item" runat="server" Text="100" />&nbsp;<asp:LinkButton ID="lnkHead150Item" runat="server" Text="150" />
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td>
           
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="ResultPanelDataDisplay">
            <thead>
                <tr>
                    <th scope="col"><strong><asp:LinkButton ID="lnkInitial" runat="server" Text="Initial▲" ForeColor="Black" style="text-decoration:none" /></strong></th>
                    <th scope="col"><strong><asp:LinkButton ID="lnkDate" runat="server" Text="Date▲" ForeColor="Black" style="text-decoration:none" /></strong></th>
                    <th scope="col"><strong><asp:LinkButton ID="lnkPNO" runat="server" Text="PNO▲" ForeColor="Black" style="text-decoration:none" /></strong></th>
                    <th scope="col"><strong><asp:LinkButton ID="lnkRoad" runat="server" Text="Road Name▲" ForeColor="Black" style="text-decoration:none" /></strong></th>
                    <th scope="col"><strong><asp:LinkButton ID="lnkProject" runat="server" Text="Project Name▲" ForeColor="Black" style="text-decoration:none" /></strong></th>
                    <th scope="col"><strong><asp:LinkButton ID="lnkLocation" runat="server" Text="Location▲" ForeColor="Black" style="text-decoration:none" /></strong></th>
                    <th scope="col"><strong><asp:LinkButton ID="lnkState" runat="server" Text="State▲" ForeColor="Black" style="text-decoration:none" /></strong></th>
                    <th scope="col"><strong><asp:LinkButton ID="lnkListType" runat="server" Text="Transaction Type▲" ForeColor="Black" style="text-decoration:none" /></strong></th>
                    <th scope="col"><strong><asp:LinkButton ID="lnkCategory" runat="server" Text="Category▲" ForeColor="Black" style="text-decoration:none" /></strong></th>
                     <th scope="col"><strong><asp:LinkButton ID="lnkType" runat="server" Text="Type▲" ForeColor="Black" style="text-decoration:none" /></strong></th>
                    <th scope="col">&nbsp;</th>
                </tr>
            </thead> 
            <tbody>
                <asp:Repeater ID="repListing" runat="server">
                    <ItemTemplate>
                        <tr>
                            <td id="first-col"><%#Container.DataItem("Initial").ToString%></td>
                            <td><asp:Label ID="lblRepDate" runat="server" Text='<%# Bind("Date","{0:dd-MMM-yyyy}") %>' /></td>
                            <td><%#Container.DataItem("PNO").ToString%></td>
                            <td><%#Container.DataItem("Road").ToString%></td>
                            <td><%#Container.DataItem("Project").ToString%></td>
                            <td><%#Container.DataItem("Location").ToString%></td>
                            <td><%#Container.DataItem("State").ToString%></td>
                            <td><%#Container.DataItem("ListType").ToString%></td>
                            <td><%#Container.DataItem("Category").ToString%></td>  
                            <td><%#Container.DataItem("Type").ToString%></td>                           
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
               </tbody>
            </table>
            
      </td>
    </tr>
    <tr>
        <td>
            <table class="ResultPanelFooter" width="100%">
                <tr>
                    <td ><asp:label ID="lblFootNoOfItem" runat="server" text="0" />&nbsp; items total</td>
                    <td align="center" valign="middle">
                        <asp:Panel ID="pnlNavigation" runat="server" style="text-align:center; vertical-align:middle;">
                                <asp:ImageButton ImageUrl="images/style01/Btn-jump-first.png"   ID="btnMoveFirst"  runat="server" Width="28"  Height="18" style="vertical-align:middle;"/>&nbsp;
                                <asp:ImageButton ImageUrl="images/style01/Btn-jump-back.png"    ID="btnPrevious"   runat="server" Width="28"  Height="18" style="vertical-align:middle;"/>&nbsp;
                                <asp:TextBox ID="txtPageNo" runat="server" Text="1" Height="12" Width="28" Font-Size="10px" style="text-align:center; vertical-align:middle;" onkeypress="return isNumberKeyOnly(event)" onpaste="return isNumberKeyOnly(event)" />&nbsp;
                                <asp:Label ID="lblTotalPage" runat="server" Height="20" Font-Size="10px" style="vertical-align: middle;"/>&nbsp;
                                <asp:ImageButton ImageUrl="images/style01/Btn-jump-go.png"      ID="btnGo"          runat="server"  Width="28" Height="18" style="vertical-align:middle;"/>&nbsp;
                                <asp:ImageButton ImageUrl="images/style01/Btn-jump-foward.png"  ID="btnNext"        runat="server"  Width="28" Height="18" style="vertical-align:middle;"/>&nbsp;
                                <asp:ImageButton ImageUrl="images/style01/Btn-jump-last.png"    ID="btnMoveLast"    runat="server"  Width="28" Height="18" style="vertical-align:middle;"/>
                                <asp:Label ID="lblMaxPageCount" runat="server" Visible="false" Height="20" Font-Size="10px" style="vertical-align:middle;"/>
                      </asp:Panel>
                    </td>
                    <td align="right">
                        Number of entries per page : <asp:LinkButton ID="lnkFoot10Item" runat="server" Text="10" />&nbsp;<asp:LinkButton ID="lnkFoot25Item" runat="server" Text="25" />&nbsp;<asp:LinkButton ID="lnkFoot100Item" runat="server" Text="100" />&nbsp;<asp:LinkButton ID="lnkFoot150Item" runat="server" Text="150" />
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
 <%--added @ 2/4/2011 by minginn - to allow user sort the result--%>
<asp:Label ID="lblHidSortType" runat="server" Visible="false" Text=" ORDER BY Date DESC, Initial DESC, PNO DESC, Road DESC, Project DESC, Location DESC, State DESC, ListType DESC, Category DESC, Type DESC" />

    </div>
</asp:Content>

